package com.tuanzi.loan.web.lazy.family.largeAmount;

import com.tuanzi.loan.business.service.family.LoanLargeAmountGongZhongUserInfoService;
import com.tuanzi.loan.core.lazy.BaseLazyDataModel;
import com.tuanzi.loan.core.util.SpringContextHolder;
import com.tuanzi.loan.core.vo.PageSearcher;
import com.tuanzi.loan.vo.request.family.largeamount.LoanLargeAmountGzhRequest;
import com.tuanzi.loan.vo.response.family.largeamount.LoanLargeAmountGzhResponse;
import org.springframework.data.domain.Page;

/**
 * User: liangZongXi
 * Create time: 19:31 2019/3/28
 * Description:
 */
public class LoanLargeAmountLazyDataModel extends BaseLazyDataModel<LoanLargeAmountGzhRequest, LoanLargeAmountGzhResponse> {

    private static final long serialVersionUID = -5794850830080296018L;

    private LoanLargeAmountGongZhongUserInfoService userInfoService = SpringContextHolder.getBean(LoanLargeAmountGongZhongUserInfoService.class);

    public LoanLargeAmountLazyDataModel(LoanLargeAmountGzhRequest loanLargeAmountGzhRequest) {
        super(loanLargeAmountGzhRequest);
    }

    @Override
    protected Page<LoanLargeAmountGzhResponse> doLoad(PageSearcher<LoanLargeAmountGzhRequest> pageSearcher) {
        return userInfoService.list(pageSearcher);
    }
}
